<?php
/**
 * Created by PhpStorm.
 * User: 颖inv
 * Date: 2016/11/15
 * Time: 9:07
 */
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>用户登录</title>
</head>
<style>
    .content{width: 300px;border: dashed 3px #DADADA;}
    th{text-align: right;}
    h2{text-align: center;}
    .title .button{margin: 0 5px;}
    .title .td-btn{text-align: center;}
</style>
<body>
<div class="content">
    <form method="post">
        <table class="title">
            <h2>欢迎登录</h2>
            <tr><th>用户名：</th><td><input type="text" name="username"/></td></tr>
            <tr><th>密码：</th><td><input type="password" name="password"/></td></tr>
            <tr><td></td><td><input type="checkbox" name="auto_login" value="on"/>下次自动登录</td></tr>
            <tr><td colspan="2" class="td-btn">
                    <input type="submit" value="登录" class="button"/>
                    <input type="reset" value="重新填写" class="button"/>
                </td> </tr>
        </table>
    </form>
</div>
</body>
</html>
<?php if(!empty($error)): ?>
    <div class="error-box">登录失败，错误信息如下：
        <ul><?php foreach ($error as $v) echo "<li>$v</li>"; ?></ul>
    </div> 
<?php endif; ?>